package com.zmh.wuye.controller;

import com.zmh.wuye.dao.WaterMapper;
import com.zmh.wuye.entity.Water;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@CrossOrigin
@RestController
public class WaterController {
    @Autowired
    private WaterMapper waterMapper;
    @RequestMapping("/selectWaterList")
    public List<Water> selectWaterList(Water water){
        return waterMapper.selectWater(water);
    }
    @RequestMapping("/getWaterCount")
    public int getWaterCount(Water water){
        return waterMapper.getCount(water);
    }
}
